


GRUB_DIR='grub'
GRUB_THEME="arch-linux"

echo '清除原目录'
sudo rm -rf /boot/${GRUB_DIR}/themes/${GRUB_THEME}

echo '拷贝文件'
sudo cp -r ${GRUB_THEME} /boot/${GRUB_DIR}/themes/${GRUB_THEME}

echo '修改grub配置'
sudo sed -i '/^GRUB_THEME=/d' /etc/default/grub
sudo sed -i '/^GRUB_GFXMODE=/d' /etc/default/grub
echo "GRUB_THEME=/boot/${GRUB_DIR}/themes/${GRUB_THEME}/theme.txt" | sudo tee -a /etc/default/grub
echo "GRUB_GFXMODE=1920x1080" | sudo tee -a /etc/default/grub

echo '重建grub配置'
sudo grub-mkconfig -o /boot/${GRUB_DIR}/grub.cfg

echo "别忘了重启"